package allwe.bean;

import java.util.Date;

public class Mouse {

    private String name;

    private Date birthday;

    public Mouse() {
        System.out.println("第一步 ，创建实例");
    }

    public Mouse(String name, Date birthday) {
        this.name = name;
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        System.out.println("第二步 ，依赖注入");
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "Mouse{" +
                "name='" + name + '\'' +
                ", birthday=" + birthday +
                '}';
    }

    public void initMethod(){
        System.out.println("第三步 ，初始化");
    }

    public void disMethod(){
        System.out.println("第五步 ，销毁");
    }
}
